setTimeout(() => {
    console.log('A')
    Promise.resolve().then(() => {
        console.log('B')
    })
}, 1000)

Promise.resolve().then(() => {
    console.log('C')
})

new Promise((resolve) => {
    console.log('D')
    resolve('')
}).then(() => {
    console.log('E')
})

async function sum(a: number, b: number) {
    console.log('F')
}

async function asyncSum(a: number, b: number) {
    await Promise.resolve()
    console.log('G')
    return Promise.resolve(a + b)
}

sum(3, 4)
asyncSum(3, 4)
console.log('H')


// my       :       D F H C E G A B
// result   :       D F H C E G A B